package com.gubei.oss.entity;

import lombok.Getter;

@Getter
public enum StorageTypeEnum {

    MINIO("minio"),
    ALIYUN("aliyun");

    public String value;

    StorageTypeEnum(String value) {
        this.value = value;
    }

    public static StorageTypeEnum getByType(String type) {
        for (StorageTypeEnum storageTypeEnum : StorageTypeEnum.values()) {
            if (storageTypeEnum.getValue().equals(type)) {
                return storageTypeEnum;
            }
        }
        return null;
    }
}
